/********************************************************************

Write Date: 2011/07/29
Author: Deng Nianchen
>>>> Add class Config to maintain config set

*********************************************************************/
#ifndef CONFIG_H
#define CONFIG_H
#include "oopobject.h"
#include "OOPString.h"
#include <map>



_OOPUTILS_BEGIN


class ConfigManager;



/**************************************************************************************************
 * <summary> Purpose: Config set, can be read from file or written to file by
 *					 ConfigManager.
 * 					 Thread-Safe: the class is not thread-safe. </summary>
 * 
 * <remarks>  Deng Nianchen, 2011/07/29. </remarks>
 **************************************************************************************************/

class _EXPORT_UTILS_CLASS Config : public OOPObject
{

	friend class ConfigManager;

public:

	Config ();

	~Config ();

	OOPString & operator [] (const OOPString & name);
	OOPString operator [] (const OOPString & name) const;

	void setFilePath (const OOPString & filePath);
	const OOPString & getFilePath () const;

private:

	std::map< OOPString, OOPString > _attrs;
	OOPString _configFilePath;

};

_OOPUTILS_END
#endif
